<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge，chrome=1">
    <meta name="renderer" content="webkit">
    <script src="../../../node_modules/jquery/dist/jquery.min.js"></script>
    <link rel="stylesheet" href="../../../node_modules/bootstrap/dist/css/bootstrap.min.css">
    <script src="../../../node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
    <script src="../../../node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
    <script src="../../../node_modules/vue/dist/vue.min.js"></script>
    <link rel="stylesheet" href="../../../node_modules/element-ui/lib/theme-chalk/index.css">
    <script src="../../../node_modules/element-ui/lib/index.js"></script>


    <!-- 自定义 -->
    <script src="../../../node_modules/mockjs/dist/mock.js"></script>
    <script src="../static/js/mock_config.js"></script>
    <script src="../static/js/index.js"></script>
    <link rel="stylesheet" href="../../index.css">
    <!-- PC -->
    <link rel="stylesheet" href="../static/css/outStore.css" media="only screen and (max-height:1600px) ">
    <!-- 手机App -->
    <link rel="stylesheet" href="../static/css/outStoreApp.css" media="only screen and (min-height:1600px) ">
</head>

<body>
    <!--头部-->
    <!-- <div class="header">
        出库看板
    </div> -->
    <!--主体-->
    <div class="main clearfix" id="app">

        <div class="header">
            <header>
                <div class="navbar">
                    <div class="card_T">
                        <div class="card A" style="background-color:#0b87fa;color: white;">
                            <ul class="header-text">
                                <li>
                                    <h8 style="line-height: 78px;">出库看板</h8>
                                </li>
                            </ul>
                        </div>
                    </div>
                    <div class="pc_content">
                        <div class="card_header">
                            <div class="card C" style="background-color: #33814e;">
                                <ul class="list-group list-group-flush">
                                    <li class="list-group-item">
                                        <h4>注塑待发料</h4>
                                    </li>
                                    <li class="list-group-item1">
                                        <h3 id="WaitPrtQty">{{defaultDt1.length}}款</h3>
                                    </li>
                                </ul>
                            </div>
                            <div class="card C" style=" background: #33814e;">
                                <ul class="list-group list-group-flush">
                                    <li class="list-group-item">
                                        <h4>组装待发料</h4>
                                    </li>
                                    <li class="list-group-item1">
                                        <h3 id="Waitcompleted">{{defaultDt2.length}}款</h3>
                                    </li>
                                </ul>
                            </div>
                        </div>
                        <div class="card_header">
                            <div class="card C" style="background:#33814e;">
                                <ul class="list-group list-group-flush">
                                    <li class="list-group-item">
                                        <h4>送货计划</h4>
                                    </li>
                                    <li class="list-group-item1">
                                        <h3 id="Col8Qty1">{{defaultDt3.length}}款</h3>
                                    </li>
                                </ul>
                            </div>
                            <div class="card C B" style="background: #33814e;">
                                <ul class="list-group list-group-flush">
                                    <li class="list-group-item">
                                        <h4>委外待发料</h4>
                                    </li>
                                    <li class="list-group-item1">
                                        <h3 id="Col7Qty1">{{defaultDt4.length}}款</h3>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </header>
        </div>

        <div class="main-left">
            <div class="border-container">
                <div class="name-title">
                    注塑待发料
                </div>
                <div>
                    <el-table :data="defaultDt1" :default-sort="{prop: 'date', order: 'ascending'}" stripe="true" ref="defaultDt1" :height=el_table_height>
                        <el-table-column prop="PPT" align="center" width="180" label="任务单号">
                        </el-table-column>
                        <el-table-column prop="MkCode" align="center" label="小微">
                        </el-table-column>
                        <el-table-column prop="GoodsName" align="center" width="180" label="材料名称">
                        </el-table-column>
                        <el-table-column align="center" label="待发料数量">
                            <template scope="scope">
                                <span v-if="scope.row.Wait<10" style="color:red">{{ scope.row.Wait}}</span>
                                <span v-else style="color: rgba(0,220,255,.88)">{{ scope.row.Wait }}</span>
                            </template>
                        </el-table-column>
                        </el-table-column>
                        <el-table-column align="center" label="待发日期">
                            <template slot-scope="scope">
                                <div :class="scope.row.Stauts" v-html="scope.row.date">
                                </div>
                            </template>
                        </el-table-column>
                    </el-table>
                </div>
                <span class="top-left border-span"></span>
                <span class="top-right border-span"></span>
                <span class="bottom-left border-span"></span>
                <span class="bottom-right border-span"></span>
            </div>
            <div class="border-container">
                <div class="name-title">
                    组装待发料
                </div>
                <div>
                    <el-table :data="defaultDt2" :default-sort="{prop: 'date', order: 'ascending'}" stripe="true" ref="defaultDt2" :height=el_table_height>
                        <!-- <el-table-column prop="PAT" align="center" width="190" label="任务单号">
                        </el-table-column> -->
                           <el-table-column prop="GoodsName" align="center" width="180" label="产品名称">
                        </el-table-column>
                        <el-table-column prop="MkCode" align="center" label="小微">
                        </el-table-column>
                        <el-table-column prop="MatlName" align="center" width="180" label="材料名称">
                        </el-table-column>
                        <el-table-column align="center" label="待发料数量">
                            <template scope="scope">
                                <span v-if="scope.row.wait<10" style="color:red">{{ scope.row.wait}}</span>
                                <span v-else style="color: rgba(0,220,255,.88)">{{ scope.row.wait }}</span>
                            </template>
                        </el-table-column>
                        <el-table-column align="center" label="待发日期">
                            <template slot-scope="scope">
                                <div :class="scope.row.Stauts" v-html="scope.row.date">
                                </div>
                            </template>
                        </el-table-column>
                    </el-table>
                </div>
                <span class="top-left border-span"></span>
                <span class="top-right border-span"></span>
                <span class="bottom-left border-span"></span>
                <span class="bottom-right border-span"></span>
            </div>
        </div>
        <div class="main-right">
            <div class="border-container">
                <div class="name-title">
                    送货计划
                </div>
                <div>
                    <el-table :data="defaultDt3" :default-sort="{prop: 'date', order: 'ascending'}" stripe="true" :height=el_table_height ref="defaultDt3">
                        <el-table-column prop="ClientCode" align="center" label="客户">
                        </el-table-column>
                        <el-table-column prop="GoodsName" align="center" width="200" label="产品名称">
                        </el-table-column>
                        <el-table-column align="center" label="计划数量">
                            <template scope="scope">
                                <span v-if="scope.row.Wait<10" style="color:red">{{ scope.row.Wait}}</span>
                                <span v-else style="color: rgba(0,220,255,.88)">{{ scope.row.Wait }}</span>
                            </template>
                        </el-table-column>
                        <el-table-column align="center" label="待送日期">
                            <template slot-scope="scope">
                                <div :class="scope.row.Stauts" v-html="scope.row.date">
                                </div>
                            </template>
                        </el-table-column>
                    </el-table>
                </div>
                <span class="top-left border-span"></span>
                <span class="top-right border-span"></span>
                <span class="bottom-left border-span"></span>
                <span class="bottom-right border-span"></span>
            </div>
            <div class="border-container">
                <div class="name-title">
                    委外待发料
                </div>
                <div>
                    <el-table :data="defaultDt4" :default-sort="{prop: 'date', order: 'ascending'}" stripe="true" :height=el_table_height ref="defaultDt4">
                        <el-table-column prop="SupplierCode" align="center" label="供应商">
                        </el-table-column>
                        <el-table-column prop="GoodsName" align="center" width="200" label="材料名称">
                        </el-table-column>
                        <el-table-column align="center" label="待发数量">
                            <template scope="scope">
                                <span v-if="scope.row.Wait<10" style="color:red">{{ scope.row.Wait}}</span>
                                <span v-else style="color: rgba(0,220,255,.88)">{{ scope.row.Wait }}</span>
                            </template>
                        </el-table-column>
                        <el-table-column align="center" label="待发日期">
                            <template slot-scope="scope">
                                <div :class="scope.row.Stauts" v-html="scope.row.date">
                                </div>
                            </template>
                        </el-table-column>
                    </el-table>
                </div>
                <span class="top-left border-span"></span>
                <span class="top-right border-span"></span>
                <span class="bottom-left border-span"></span>
                <span class="bottom-right border-span"></span>
            </div>
        </div>
    </div>

</body>



<script>
    new Vue({
        el: '#app',
        data() {
            return {
                el_table_height: 350,
                defaultDt1: [],
                defaultDt2: [],
                defaultDt3: [],
                defaultDt4: [],
            }
        },
        methods: {
            tableRowClassName({
                row,
                rowIndex
            }) {
                if (row.Stauts == "open") {
                    return 'open';
                } else {
                    return 'close';
                }
            },
            GetTabelDate(that) {
                // 注塑待发料
                GetCodeData("VB21071519293140", "Get", "Goods").then(function(res) {
                        that.defaultDt1 = res.rows
                    }),
                    //组装待发料
                    GetCodeData("VB21071519325020", "Get", "Goods").then(function(res) {
                        that.defaultDt2 = res.rows
                    }),
                    //送货计划
                    GetCodeData("VB21072010372563", "Get", "Goods").then(function(res) {
                        that.defaultDt3 = res.rows
                    }),
                    //委外待发料
                    GetCodeData("VB21072010431029", "Get", "Goods").then(function(res) {
                        that.defaultDt4 = res.rows
                    })
            },
            formatterTime(row, column) {
                let data = row[column.property]
                return /\d{4}-\d{1,2}-\d{1,2}/g.exec(data)
            }
        },

        mounted() {
            TableAotoRoll([this.$refs.defaultDt1, this.$refs.defaultDt2, this.$refs.defaultDt3, this.$refs.defaultDt4])
            var that = this
            setTimeout(function() {
                that.GetTabelDate(that)
            }, 0);
            setInterval(function() {
                that.GetTabelDate(that)
            }, 1000 * 60);
        }
    })
</script>



</html>